package com.wry.wry_test.feign.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @Author: wangrongyi
 * @Date: 2024/7/24 15:30
 * @Description: 负载均衡配置参数
 */
@Component("loadBalanceProperties")
@ConfigurationProperties(prefix = "load.balance.config")
@Data
public class LoadBalanceProperties {

    /**
     * 算法名称
     */
    private String algorithm;
    /**
     * 服务地址
     */
    private List<String> address;
    /**
     * 服务地址权重配置
     */
    private Map<String, Integer> weight;

}
